package com.github.itdachen.product.sdk.query;

import com.github.itdachen.framework.core.biz.BizQuery;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


import java.io.Serializable;


/**
 * 产品类目 查询参数
 *
 * @author 王大宸
 * @date 2025-03-04 15:48:47
 */
public class ProductClazzInfoQuery extends BizQuery implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 应用ID, 备用字段
     */
    private String appId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 第一层ID
     */
    private String rootId;

    /**
     * 上级ID
     */
    private String parentId;

    /**
     * 分类层级, 最多三级
     */
    private String clazzLevel;

    /**
     * 标题名称
     */
    private String clazzTitle;

    /**
     * 是否展示/有效标志: Y-有效;N-无效
     */
    private String validFlag;

    /**
     * 删除标志: Y-已删除;N-未删除
     */
    private String removeFlag;


    public ProductClazzInfoQuery() {
    }

    public ProductClazzInfoQuery(int page, int limit, String appId, String tenantId, String rootId, String parentId, String clazzLevel, String clazzTitle, String validFlag, String removeFlag) {
        super(page, limit);
        this.appId = appId;
        this.tenantId = tenantId;
        this.rootId = rootId;
        this.parentId = parentId;
        this.clazzLevel = clazzLevel;
        this.clazzTitle = clazzTitle;
        this.validFlag = validFlag;
        this.removeFlag = removeFlag;
    }

    public static ProductClazzInfoQueryBuilder builder() {
        return new ProductClazzInfoQueryBuilder();
    }

    public static class ProductClazzInfoQueryBuilder {
        private Integer page = 1;
        private Integer limit = 10;
        private String appId;
        private String tenantId;
        private String rootId;
        private String parentId;
        private String clazzLevel;
        private String clazzTitle;
        private String validFlag;
        private String removeFlag;

        public ProductClazzInfoQueryBuilder() {
        }

        public ProductClazzInfoQueryBuilder page(Integer page) {
            this.page = page;
            return this;
        }

        public ProductClazzInfoQueryBuilder limit(Integer limit) {
            this.limit = limit;
            return this;
        }

        /* 应用ID, 备用字段 */
        public ProductClazzInfoQueryBuilder appId(String appId) {
            this.appId = appId;
            return this;
        }

        /* 租户ID */
        public ProductClazzInfoQueryBuilder tenantId(String tenantId) {
            this.tenantId = tenantId;
            return this;
        }

        /* 第一层ID */
        public ProductClazzInfoQueryBuilder rootId(String rootId) {
            this.rootId = rootId;
            return this;
        }

        /* 上级ID */
        public ProductClazzInfoQueryBuilder parentId(String parentId) {
            this.parentId = parentId;
            return this;
        }

        /* 分类层级, 最多三级 */
        public ProductClazzInfoQueryBuilder clazzLevel(String clazzLevel) {
            this.clazzLevel = clazzLevel;
            return this;
        }

        /* 标题名称 */
        public ProductClazzInfoQueryBuilder clazzTitle(String clazzTitle) {
            this.clazzTitle = clazzTitle;
            return this;
        }

        /* 是否展示/有效标志: Y-有效;N-无效 */
        public ProductClazzInfoQueryBuilder validFlag(String validFlag) {
            this.validFlag = validFlag;
            return this;
        }

        /* 删除标志: Y-已删除;N-未删除 */
        public ProductClazzInfoQueryBuilder removeFlag(String removeFlag) {
            this.removeFlag = removeFlag;
            return this;
        }

        public ProductClazzInfoQuery build() {
            return new ProductClazzInfoQuery(page, limit, appId, tenantId, rootId, parentId, clazzLevel, clazzTitle, validFlag, removeFlag);
        }

    }


    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppId() {
        return appId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setRootId(String rootId) {
        this.rootId = rootId;
    }

    public String getRootId() {
        return rootId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setClazzLevel(String clazzLevel) {
        this.clazzLevel = clazzLevel;
    }

    public String getClazzLevel() {
        return clazzLevel;
    }

    public void setClazzTitle(String clazzTitle) {
        this.clazzTitle = clazzTitle;
    }

    public String getClazzTitle() {
        return clazzTitle;
    }

    public void setValidFlag(String validFlag) {
        this.validFlag = validFlag;
    }

    public String getValidFlag() {
        return validFlag;
    }

    public void setRemoveFlag(String removeFlag) {
        this.removeFlag = removeFlag;
    }

    public String getRemoveFlag() {
        return removeFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("page", getPage())
                .append("limit", getLimit())
                .append("appId", getAppId())
                .append("tenantId", getTenantId())
                .append("rootId", getRootId())
                .append("parentId", getParentId())
                .append("clazzLevel", getClazzLevel())
                .append("clazzTitle", getClazzTitle())
                .append("validFlag", getValidFlag())
                .append("removeFlag", getRemoveFlag())
                .toString();
    }

}
